#ifndef WF_POLYLINEAPPEND_H
#define WF_POLYLINEAPPEND_H

#include "wf_drawpolyline.h"
#include "gui_export.h"

/**
 * This action class can handle user events to move entities.
 *
 */
class GUI_EXPORT WF_PolylineAppend : public WF_DrawPolyline {//public PF_PreviewActionInterface {
	Q_OBJECT
public:
	/**
	 * Action States.
	 */
//	enum Status {
//		SetStartpoint,   /**< Setting the startpoint.  */
//		SetNextPoint	  /**< Setting the endpoint. */
//	};

public:
	WF_PolylineAppend(PF_Container& container,
						PF_GraphicView& graphicView);
//	~PF_ActionPolylineAppend();

	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionPolylineAppend;
	}
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

//	void reset();

//	virtual void init(int status=0);
	
	virtual void trigger();
	
//	virtual void mouseMoveEvent(PF_MouseEvent* e);
        virtual void mouseReleaseEvent(QMouseEvent* e);
	
	virtual void coordinateEvent(PF_CoordinateEvent* e);
//  virtual void commandEvent(PF_CommandEvent* e);
//	virtual PF_StringList getAvailableCommands();

//	virtual void showOptions();
//	virtual void hideOptions();

	virtual void updateMouseButtonHints();
//  virtual void updateMouseCursor();
//	virtual void updateToolBar();
//	void close();
//	void undo();

private:
	/**
	 * Line data defined so far.
	 */
//	PF_PolylineAttribute data;
	
	/**
	 * Polyline entity we're working on.
	 */
//	PF_Polyline* polyline;
	PF_Polyline* originalPolyline;
	bool prepend;
	/**
	 * last point.
	 */
//	PF_Vector point;

	/**
	 * Start point of the series of lines. Used for close function.
	 */
//	PF_Vector start;

	/**
	 * Point history (for undo)
	 */
//	QList<PF_Vector> history;
	
	/**
	 * Bulge history (for undo)
	 */
//	QList<double> bHistory;

};

#endif
